Alex Crichton [Wed, 14 Jan 2015 04:21:52 +0000 (20:21 -0800)]
Use same find -perm syntax as rustc
Closes #822
bors [Tue, 13 Jan 2015 22:14:44 +0000 (22:14 +0000)]
Auto merge of #1160 - alexcrichton:update, r=alexcrichton
Alex Crichton [Tue, 13 Jan 2015 16:41:04 +0000 (08:41 -0800)]
Update to rust master
bors [Tue, 13 Jan 2015 21:09:13 +0000 (21:09 +0000)]
Auto merge of #1161 - alexcrichton:issue-1159, r=huonw
Looks like these got tweaked from the compiler...
Closes #1159
bors [Tue, 13 Jan 2015 17:36:14 +0000 (17:36 +0000)]
Auto merge of #1154 - tshepang:patch-1, r=alexcrichton
Alex Crichton [Tue, 13 Jan 2015 16:53:55 +0000 (08:53 -0800)]
Relax checks for error messages
Looks like these got tweaked from the compiler...
Closes #1159
Tshepang Lekhonkhobe [Mon, 12 Jan 2015 22:21:37 +0000 (00:21 +0200)]
doc: typo fix
bors [Sun, 11 Jan 2015 05:18:59 +0000 (05:18 +0000)]
Auto merge of #1148 - FlaPer87:change-home, r=alexcrichton
Users changing cargo's home directory expect it to be used as top path
instead of there being a `.cargo` hidden dir in it. There are some cases
following this pattern one of them is python's virtualenvwrapper, which
uses `WORK_HOME` as a home dir for everything.
This patch removes the extra `.cargo` and assumes that CARGO_HOME is the
real path a user wants to use as a homedir for cargo.
bors [Sun, 11 Jan 2015 04:36:17 +0000 (04:36 +0000)]
Auto merge of #1149 - rndr:issue-1146, r=alexcrichton
Closes #1146
rndr [Sun, 11 Jan 2015 02:47:24 +0000 (07:47 +0500)]
use release profile for examples build with --release flag
Flavio Percoco [Sat, 10 Jan 2015 23:44:12 +0000 (00:44 +0100)]
Don't use `.cargo` for custom CARGO_HOME
Users changing cargo's home directory expect it to be used as top path
instead of there being a `.cargo` hidden dir in it. There are some cases
following this pattern one of them is python's virtualenvwrapper, which
uses `WORK_HOME` as a home dir for everything.
This patch removes the extra `.cargo` and assumes that CARGO_HOME is the
real path a user wants to use as a homedir for cargo.
bors [Fri, 9 Jan 2015 23:38:12 +0000 (23:38 +0000)]
Auto merge of #1143 - alexcrichton:issue-1138, r=huonw
Same fix as #923.
Closes #1138
Alex Crichton [Fri, 9 Jan 2015 23:33:35 +0000 (15:33 -0800)]
Don't require Cargo.toml for `cargo yank`
Same fix as #923.
Closes #1138
bors [Fri, 9 Jan 2015 22:13:10 +0000 (22:13 +0000)]
Auto merge of #1141 - sp3d:master, r=alexcrichton
document ~/.cargo and CARGO_HOME, specify manpage section for rustc/rustdoc
sp3d [Fri, 9 Jan 2015 22:02:30 +0000 (22:02 +0000)]
give docs a little attention
document ~/.cargo and CARGO_HOME, specify manpage section for rustc/rustdoc
bors [Thu, 8 Jan 2015 20:52:43 +0000 (20:52 +0000)]
Auto merge of #1131 - alexcrichton:issue-880, r=brson
This fixes a number of bugs along the way:
* Submodules are now recursed into explicitly for packaging, fixing #943
* A whitelist has been implemented, fixing #880
* Git repos are now always used if there is a package that resides at the root,
not just if the current package resides at the root.
Alex Crichton [Tue, 6 Jan 2015 07:54:16 +0000 (23:54 -0800)]
Update how a PathSource is traversed for git repos
This fixes a number of bugs along the way:
* Submodules are now recursed into explicitly for packaging, fixing #943
* A whitelist has been implemented, fixing #880
* Git repos are now always used if there is a package that resides at the root,
not just if the current package resides at the root.
bors [Thu, 8 Jan 2015 19:35:06 +0000 (19:35 +0000)]
Auto merge of #1122 - alexcrichton:issue-1119, r=brson
It looks like tags don't always point to tag objects, but rather sometimes to
commits themselves. This tweaks the peeling logic for tags to find an *object*
first, and then peel to a commit, rather than finding a tag first and then
peeling.
Closes #1119
bors [Thu, 8 Jan 2015 19:18:04 +0000 (19:18 +0000)]
Auto merge of #1120 - rndr:issue-831, r=alexcrichton
Closes #831
rndr [Sat, 3 Jan 2015 16:33:08 +0000 (21:33 +0500)]
Allow using --release flag with --example
Closes #831
bors [Tue, 6 Jan 2015 02:37:42 +0000 (02:37 +0000)]
Auto merge of #1124 - wesleywiser:vcs_config_option, r=alexcrichton
bors [Tue, 6 Jan 2015 02:21:22 +0000 (02:21 +0000)]
Auto merge of #1123 - alexcrichton:issue-1037, r=alexcrichton
Now that the compiler supports the notion for a "dependency lookup path" Cargo
can specify this information to the compiler in order to prevent transitive
dependencies from being imported.
Closes #1037
Wesley Wiser [Mon, 5 Jan 2015 01:59:43 +0000 (20:59 -0500)]
git option in config should be an enumeration
The option in ~/.cargo/config is now called `vcs` and has the following
options: "git", "hg", and "none". This corresponds to the options for
the --vcs argument to `cargo new`.
This also fixes detection for hg repositories. Previously, we only tried
to discover if the working directory was contained in a git repository.
If it was, we would skip creating a git repo. Now, we check if the
working directory is contained in either a git or mecurial repo. If it
is, we skip creating a new repo.
Fixes #1116
Wesley Wiser [Sun, 4 Jan 2015 23:11:55 +0000 (18:11 -0500)]
[cargo new] Add a new --vcs enumeration flag
Replace the --git, --hg, and --no-git flags with a --vcs enumeration
flag which supports the values "git", "hg", and "none".
Related to #1116
Alex Crichton [Sun, 4 Jan 2015 09:16:33 +0000 (01:16 -0800)]
Start using precise -L flags
Now that the compiler supports the notion for a "dependency lookup path" Cargo
can specify this information to the compiler in order to prevent transitive
dependencies from being imported.
Closes #1037
Alex Crichton [Sun, 4 Jan 2015 09:02:16 +0000 (01:02 -0800)]
Update to rust master
bors [Mon, 5 Jan 2015 18:37:39 +0000 (18:37 +0000)]
Auto merge of #1126 - akiss77:pr-test_cargo_compile, r=alexcrichton
For two tests, the `Cargo.toml`s and the `cfg`s don't match. E.g., the first test expects a successful build on all linux platforms but its `toml` is prepared for Intel linuxes only. The second test is very similar.
Here, the `cfg`s are amended to match the `toml`s.
bors [Mon, 5 Jan 2015 16:36:00 +0000 (16:36 +0000)]
Auto merge of #1107 - tomaka:extract-commands-system, r=alexcrichton
With this change, the various commands in Cargo now build a `CommandPrototype` instead of a `ProcessBuilder`. This `CommandPrototype` is then passed to an object that implements the `CommandsExecution` trait, which executes them.
Ideally `CommandPrototype` would look like this:
```rust
enum CommandPrototype {
Rustc {
libraries: Vec<String>,
opt_level: uint,
input: Path,
... etc... (all the options that can be passed to rustc)
},
Rustdoc {
... (all the options that can be passed to rustdoc)
},
Custom {
cmd: ...,
env: ...,
}
}
```
...but that's a bit too much work for now (maybe in a follow-up).
What this enables is using the Cargo library to intercept the build commands and tweak them. I'm planning to write `cargo-emscripten` thanks to this change.
With this, one could also imagine embedding rustc and rustdoc directly inside cargo, if that is needed.
Akos Kiss [Mon, 5 Jan 2015 15:53:22 +0000 (15:53 +0000)]
Fix cfg of platform-specific tests
Pierre Krieger [Tue, 30 Dec 2014 17:15:44 +0000 (18:15 +0100)]
Build a CommandPrototype instead of a ProcessBuilder
Alex Crichton [Sun, 4 Jan 2015 06:45:58 +0000 (22:45 -0800)]
Find objects instead of tags.
It looks like tags don't always point to tag objects, but rather sometimes to
commits themselves. This tweaks the peeling logic for tags to find an *object*
first, and then peel to a commit, rather than finding a tag first and then
peeling.
Closes #1119
bors [Sat, 3 Jan 2015 23:29:22 +0000 (23:29 +0000)]
Auto merge of #1121 - brson:installer, r=alexcrichton
No fixes here apply to Cargo. Just keeping up to date.
Brian Anderson [Sat, 3 Jan 2015 20:37:25 +0000 (12:37 -0800)]
Update rust-installer
No fixes here apply to Cargo. Just keeping up to date.
bors [Sat, 3 Jan 2015 05:33:05 +0000 (05:33 +0000)]
Auto merge of #1118 - brson:installer, r=alexcrichton
Fixes a syntax error in the install script
Brian Anderson [Sat, 3 Jan 2015 01:00:09 +0000 (17:00 -0800)]
Update rust-installer
bors [Fri, 2 Jan 2015 21:41:12 +0000 (21:41 +0000)]
Auto merge of #1117 - alexcrichton:update, r=alexcrichton
Alex Crichton [Fri, 2 Jan 2015 21:39:30 +0000 (13:39 -0800)]
Update to rust master
bors [Wed, 31 Dec 2014 21:39:41 +0000 (21:39 +0000)]
Auto merge of #1111 - alexcrichton:rollup, r=alexcrichton
bors [Wed, 31 Dec 2014 21:10:58 +0000 (21:10 +0000)]
Auto merge of #1110 - brson:install, r=alexcrichton
This bug shouldn't actually cause any problems but it's a mistake that causes cargo's manifest to be stored in `/usr/lib/cargo` instead of `/usr/lib/rustlib`. People who upgrade will probably end up with an extra 'cargo' dir laying around...
Alex Crichton [Wed, 31 Dec 2014 20:02:18 +0000 (12:02 -0800)]
Update usage of git2-rs
Alex Crichton [Wed, 31 Dec 2014 19:57:02 +0000 (11:57 -0800)]
Merge branch 'master' of https://github.com/marcbowes/cargo into pr-1094
Alex Crichton [Wed, 31 Dec 2014 19:54:15 +0000 (11:54 -0800)]
Add a test for CARGO_PKG_VERSION
Alex Crichton [Wed, 31 Dec 2014 19:52:38 +0000 (11:52 -0800)]
Merge branch 'cargo_pkg_version' of https://github.com/wesleywiser/cargo into pr-1094
Brian Anderson [Wed, 31 Dec 2014 19:47:07 +0000 (11:47 -0800)]
mk: Fix cargo installation manifest location
Marc Bowes [Tue, 30 Dec 2014 12:13:36 +0000 (14:13 +0200)]
Update dependencies for ascii reform
bors [Tue, 30 Dec 2014 18:14:23 +0000 (18:14 +0000)]
Auto merge of #1102 - brson:rust-installer-v2, r=brson
Needs to merge directly after https://github.com/rust-lang/rust/pull/20317
bors [Tue, 30 Dec 2014 03:47:46 +0000 (03:47 +0000)]
Auto merge of #1082 - alexcrichton:std-error, r=alexcrichton
Brian Anderson [Tue, 30 Dec 2014 03:03:54 +0000 (19:03 -0800)]
Fix 'make no-exes'
Alex Crichton [Sun, 21 Dec 2014 23:19:44 +0000 (15:19 -0800)]
Clean up Cargo's util::errors module
This commit cleans up cargo's error module to reduce the duplication of
`CargoError` and the standard library's `Error` trait. The `CargoError` trait
remains, but only has one methods, `is_human`.
A number of other modifications were made:
* ChainError was altered to work over unboxed closures
* Wrap and Require were removed as they're duplicates of the ChainError
functionality.
* Many public error types are now private from util::errors as they're only
returned as boxed trait objects.
* The `concrete` was removed, all calls to `make_human` are now done through a
newtype `Human` wrapper.
* Cargo's custom `try!` macro was removed.
Felipe Sere [Wed, 17 Dec 2014 21:18:24 +0000 (21:18 +0000)]
Removes macro and conflicting impls
Felipe Sere [Wed, 17 Dec 2014 20:56:33 +0000 (20:56 +0000)]
Naive replacement of FromError
bors [Tue, 30 Dec 2014 02:28:49 +0000 (02:28 +0000)]
auto merge of #1100 : kballard/cargo/tweak-readme-install-instructions, r=alexcrichton
There's no need to promote the use of the `pwd` command when shells export the
current directory as `$PWD`. Using `$PWD` makes the commandline work in fish
as well. Additionally, quote the variable so it works properly even if the cwd
has a space in it.
bors [Tue, 30 Dec 2014 01:58:39 +0000 (01:58 +0000)]
auto merge of #1074 : alexcrichton/cargo/issue-1069, r=brson
This commit unifies the notion of a "git revision" between a SourceId and the
GitSource. This pushes the request of a branch, tag, or revision all the way
down into a GitSource so special care can be taken for each case.
This primarily was discovered by #1069 where a git tag's id is different from
the commit that it points at, and we need to push the knowledge of whether it's
a tag or not all the way down to the point where we resolve what revision we
want (and perform appropriate operations to find the commit we want).
Closes #1069
bors [Tue, 30 Dec 2014 00:13:39 +0000 (00:13 +0000)]
auto merge of #1097 : alexcrichton/cargo/dev-deps-for-examples, r=brson
Alex Crichton [Mon, 8 Dec 2014 18:46:07 +0000 (10:46 -0800)]
Refactor git rev handling infrastructure
This commit unifies the notion of a "git revision" between a SourceId and the
GitSource. This pushes the request of a branch, tag, or revision all the way
down into a GitSource so special care can be taken for each case.
This primarily was discovered by #1069 where a git tag's id is different from
the commit that it points at, and we need to push the knowledge of whether it's
a tag or not all the way down to the point where we resolve what revision we
want (and perform appropriate operations to find the commit we want).
Closes #1069
Kevin Ballard [Mon, 29 Dec 2014 21:05:22 +0000 (13:05 -0800)]
Use "$PWD" instead of `pwd` in install instructions
There's no need to promote the use of the `pwd` command when shells
export the current directory as `$PWD`. Using `$PWD` makes the
commandline work in fish as well. Additionally, quote the variable so it
works properly even if the cwd has a space in it.
Brian Anderson [Fri, 12 Dec 2014 02:04:34 +0000 (18:04 -0800)]
Upgrade rust-installer to v2
Alex Crichton [Sun, 28 Dec 2014 09:04:10 +0000 (01:04 -0800)]
Be sure to include --extern for dev-deps and examples
Alex Crichton [Sun, 28 Dec 2014 02:33:08 +0000 (20:33 -0600)]
Merge pull request #1093 from poiru/always-show-vertical-scroll
Always display vertical scrollbar
Wesley Wiser [Fri, 26 Dec 2014 21:38:25 +0000 (16:38 -0500)]
Export full package version as CARGO_PKG_VERSION
Fixes #1047
Birunthan Mohanathas [Fri, 26 Dec 2014 13:04:37 +0000 (15:04 +0200)]
Always display vertical scrollbar
Birunthan Mohanathas [Fri, 26 Dec 2014 13:03:01 +0000 (15:03 +0200)]
Merge body blocks in all.css
bors [Thu, 25 Dec 2014 04:28:40 +0000 (04:28 +0000)]
auto merge of #1089 : bheart/cargo/master, r=alexcrichton
Builds break on recent versions of rustc.
This is in response to rust-lang/rust@
16f01cc - the change was addressed
in rust-lang/rustc-serialize@
1561cca, versioned 0.1.5.
Update dependency accordingly.
Will Tange [Thu, 25 Dec 2014 01:53:32 +0000 (02:53 +0100)]
Update rustc-serialize to 0.1.5
This is in response to rust-lang/rust@
16f01cc - the change was addressed
in rust-lang/rustc-serialize@
1561cca, versioned 0.1.5.
Update dependency to this version.
bors [Thu, 25 Dec 2014 00:13:40 +0000 (00:13 +0000)]
auto merge of #1085 : geomaster/cargo/master, r=alexcrichton
rust-lang/rust#19253 and rust-lang/rust@
25f8051 have introduced changes
to the namespacing within the std::collections::hash_map, breaking some
of Cargo code which imported these.
rust-lang/rust@
cf350ea, implementing changes proposed by RFC #344, have
also broken some code which relies on hash_set::SetItems (now renamed to
hash_set::Iter).
This PR fixes the incompatibilities: imports of
std::collections::hash_map::{Occupied, Vacant} have been replaced by
imports of std::collections::hash_map::Entry::{Occupied, Vacant} and one
instance where the SetItems has been used was replaced by the proper
usage of Iter.
David Davidović [Wed, 24 Dec 2014 20:40:14 +0000 (21:40 +0100)]
Temporary fix for tests
Two tests (test_with_deep_lib_dep and lib_with_standard_name) fail due
to a bug in rustdoc (see rust-lang/rust#20183) so temporarily changing
these so they pass. Be sure to change it back when the fix lands in the
current rust nightly
David Davidović [Wed, 24 Dec 2014 20:37:56 +0000 (21:37 +0100)]
Use std::iter repeat to generate indentation level
David Davidović [Wed, 24 Dec 2014 20:37:01 +0000 (21:37 +0100)]
Avoid logic duplication
As suggested by @alexcrichton, reverted back to the old way of handling
both Job::new and Job::noop that avoids ugly constructs and code
duplication
David Davidović [Wed, 24 Dec 2014 04:51:39 +0000 (05:51 +0100)]
Fix deprecation warnings
Apparently .repeat() for str and .into_string() have been deprecated,
replace them with suggested alternatives
David Davidović [Wed, 24 Dec 2014 04:50:47 +0000 (05:50 +0100)]
Break long lines
...
David Davidović [Wed, 24 Dec 2014 04:50:01 +0000 (05:50 +0100)]
Fix tests
David Davidović [Wed, 24 Dec 2014 04:04:31 +0000 (05:04 +0100)]
Add rustc-serialize dependency to registry
David Davidović [Wed, 24 Dec 2014 03:58:53 +0000 (04:58 +0100)]
Update Cargo.lock for newest dependencies
David Davidović [Wed, 24 Dec 2014 03:27:07 +0000 (04:27 +0100)]
Add Levenshtein distance implementation
Copy lev_distance.rs verbatim from Rust since str::lev_distance has been
deprecated by rust-lang/rust@
9b99436 with no replacement and change code
to use it instead of the deprecated function
David Davidović [Wed, 24 Dec 2014 03:01:23 +0000 (04:01 +0100)]
Update dependency info
Bump to newest versions of several libraries
David Davidović [Wed, 24 Dec 2014 02:56:11 +0000 (03:56 +0100)]
Fix fn type mismatch error
rustc complains that we cannot assign two different fn's to a single
object within an if-else block. I was not able to figure out what causes
this; so deferring the execution of the particular function is a
reasonable fallback. Not very elegant and should be changed to something
with less boilerplate
David Davidović [Wed, 24 Dec 2014 02:53:42 +0000 (03:53 +0100)]
Handle from_utf8 new return type
As per rust-lang/rust@
9b99436, the return type of from_utf8 has been
changed from Option to Result. Consequently, update code which relied on
this return type to work with Ok(...) and Err(...) instead of Some(...)
and None
David Davidović [Wed, 24 Dec 2014 02:48:27 +0000 (03:48 +0100)]
Update references to renamed traits
As per rust-lang/rust@
f8cfd24, rename references to slice::Items to
slice::Iter and slice::MutItems to slice::IterMut
David Davidović [Wed, 24 Dec 2014 02:45:46 +0000 (03:45 +0100)]
Migrate to rustc-serialize
As per rust-lang/rust@
b04bc5c, move all Encodable and Decodable deriving
modes to RustcEncodable and RustcDecodable, and also extern the
rustc-serialize crate instead of the former serialize one.
David Davidović [Tue, 23 Dec 2014 22:06:55 +0000 (23:06 +0100)]
Bump version numbers
Updated to use the latest 2014-12-23 nightly and newest versions of
crates url and docopt.rs
bors [Tue, 23 Dec 2014 03:58:46 +0000 (03:58 +0000)]
auto merge of #1084 : brson/cargo/home, r=alexcrichton
...ar.
I intend to use this to allow many copies of the Rust toolchain to coexist.
My project for managing Rust toolchains: https://github.com/brson/multirust
Brian Anderson [Mon, 22 Dec 2014 21:58:24 +0000 (13:58 -0800)]
Allow the location of `~/.cargo` to be overridden via `CARGO_HOME` env var.
I intend to use this to allow many copies of the Rust toolchain to coexist.
David Davidović [Tue, 23 Dec 2014 02:35:44 +0000 (03:35 +0100)]
Bump required rust version
Latest changes require that we build with a later Rust nightly
David Davidović [Tue, 23 Dec 2014 02:15:56 +0000 (03:15 +0100)]
Update to rust master
rust-lang/rust#19253 and rust-lang/rust@
25f8051 have introduced changes
to the namespacing within the std::collections::hash_map, breaking some
of Cargo code which imported these.
rust-lang/rust@
cf350ea, implementing changes proposed by RFC #344, have
also broken some code which relies on hash_set::SetItems (now renamed to
hash_set::Iter).
This commit fixes the incompatibilities: imports of
std::collections::hash_map::{Occupied, Vacant} have been replaced by
imports of std::collections::hash_map::Entry::{Occupied, Vacant} and one
instance where the SetItems has been used was replaced by the proper
usage of Iter.
bors [Sun, 21 Dec 2014 20:43:45 +0000 (20:43 +0000)]
auto merge of #1079 : alexcrichton/cargo/update-rust, r=alexcrichton
Continuation of #1077
Closes https://github.com/rust-lang/cargo/pull/1079
Alex Crichton [Sun, 21 Dec 2014 18:45:39 +0000 (10:45 -0800)]
Update to rust master
Alex Crichton [Sun, 21 Dec 2014 19:06:09 +0000 (11:06 -0800)]
Merge branch 'pr-btree' of https://github.com/akiss77/cargo into akiss77-pr-btree
bors [Sun, 21 Dec 2014 17:43:45 +0000 (17:43 +0000)]
auto merge of #1078 : alexcrichton/cargo/issue-1071-readme-fix, r=alexcrichton
Alex Crichton [Sun, 21 Dec 2014 17:37:32 +0000 (09:37 -0800)]
Fix readme instructions for submodules
Akos Kiss [Sun, 21 Dec 2014 17:00:39 +0000 (18:00 +0100)]
Use std::collections::{BTreeSet, BTreeMap} instead of std::collections::{TreeSet, TreeMap}.
bors [Sun, 21 Dec 2014 07:28:44 +0000 (07:28 +0000)]
auto merge of #1075 : cmr/cargo/rustc-vverbose, r=alexcrichton
Closes #1073
Corey Richardson [Sun, 21 Dec 2014 06:41:02 +0000 (01:41 -0500)]
Update to new-style rustc CLI args
bors [Sun, 21 Dec 2014 05:51:34 +0000 (05:51 +0000)]
auto merge of #1066 : alexcrichton/cargo/registry-deps, r=alexcrichton
Alex Crichton [Fri, 19 Dec 2014 18:38:32 +0000 (10:38 -0800)]
Update rust and all deps
Alex Crichton [Fri, 19 Dec 2014 03:01:37 +0000 (19:01 -0800)]
Move all deps to the registry
bors [Fri, 19 Dec 2014 21:45:29 +0000 (21:45 +0000)]
auto merge of #1067 : alexcrichton/cargo/fix-registry-update, r=alexcrichton
If a registry already knew about a package, but didn't know about newly
published version of a package, then the registry would occasionally not be
updated when it otherwise needed to be.
Alex Crichton [Fri, 19 Dec 2014 21:43:21 +0000 (13:43 -0800)]
Fix cases where a registry is not updated
If a registry already knew about a package, but didn't know about newly
published version of a package, then the registry would occasionally not be
updated when it otherwise needed to be.
bors [Fri, 19 Dec 2014 16:28:44 +0000 (16:28 +0000)]
auto merge of #1064 : alexcrichton/cargo/snapshots, r=alexcrichton
Should fix the mac bots
Alex Crichton [Fri, 19 Dec 2014 07:03:06 +0000 (23:03 -0800)]
Register new snapshots
Should fix the mac bots
bors [Thu, 18 Dec 2014 17:13:45 +0000 (17:13 +0000)]
auto merge of #1045 : alexcrichton/cargo/update-git2, r=alexcrichton
Should fix #1032 and #1029